/*
 Navicat Premium Data Transfer

 Source Server         : localhost
 Source Server Type    : MySQL
 Source Server Version : 50562
 Source Host           : 127.0.0.1:3306
 Source Schema         : tp5

 Target Server Type    : MySQL
 Target Server Version : 50562
 File Encoding         : 65001

 Date: 03/02/2021 17:52:20
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for tp_auth_group
-- ----------------------------
DROP TABLE IF EXISTS `tp_auth_group`;
CREATE TABLE `tp_auth_group` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL DEFAULT '' COMMENT '分组名',
  `desc` varchar(255) NOT NULL DEFAULT '' COMMENT '描述',
  `show_rules` varchar(500) NOT NULL COMMENT '【仅用于数据回显】用户组拥有的规则id，多个规则 , 隔开',
  `rules` varchar(500) NOT NULL COMMENT '【真实权限】用户组拥有的规则id，多个规则 , 隔开',
  `status` int(10) NOT NULL DEFAULT '1' COMMENT '状态；1：启用，2：禁用',
  `update_time` int(10) NOT NULL DEFAULT '0' COMMENT '编辑时间',
  `create_time` int(10) NOT NULL DEFAULT '0' COMMENT '创建时间',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COMMENT='权限分组表';

-- ----------------------------
-- Records of tp_auth_group
-- ----------------------------
BEGIN;
INSERT INTO `tp_auth_group` VALUES (1, '默认权限组', '默认权限组', '1,4,6,31,12,8,9', '1,4,6,31,12,8,9,5,2', 2, 1612339585, 0);
COMMIT;

-- ----------------------------
-- Table structure for tp_auth_group_access
-- ----------------------------
DROP TABLE IF EXISTS `tp_auth_group_access`;
CREATE TABLE `tp_auth_group_access` (
  `uid` int(10) unsigned NOT NULL COMMENT '用户id',
  `group_id` mediumint(8) unsigned NOT NULL COMMENT '用户组id',
  UNIQUE KEY `uid_group_id` (`uid`,`group_id`),
  KEY `uid` (`uid`),
  KEY `group_id` (`group_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='成员授权列表';

-- ----------------------------
-- Records of tp_auth_group_access
-- ----------------------------
BEGIN;
INSERT INTO `tp_auth_group_access` VALUES (3, 1);
INSERT INTO `tp_auth_group_access` VALUES (3, 2);
COMMIT;

-- ----------------------------
-- Table structure for tp_config
-- ----------------------------
DROP TABLE IF EXISTS `tp_config`;
CREATE TABLE `tp_config` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL DEFAULT '' COMMENT '配置标识（使用config函数调用，只能使用英文且不能重复）',
  `title` varchar(255) NOT NULL DEFAULT '' COMMENT '标题',
  `type` tinyint(3) NOT NULL DEFAULT '1' COMMENT '配置类型；1：字符，2：数字，3：文本，4：数组',
  `group_id` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '配置分组',
  `value` text NOT NULL COMMENT '配置值',
  `remark` text NOT NULL COMMENT '配置详细说明',
  `sort` tinyint(3) NOT NULL DEFAULT '0' COMMENT '排序',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COMMENT='配置表';

-- ----------------------------
-- Records of tp_config
-- ----------------------------
BEGIN;
INSERT INTO `tp_config` VALUES (1, 'WEB_TITLE', '网站标题', 1, 1, 'TP5.0', '', 0);
INSERT INTO `tp_config` VALUES (3, 'WEB_RECORD', '网站备案号', 1, 1, '湘ICP备18012419号', '', 1);
COMMIT;

-- ----------------------------
-- Table structure for tp_config_group
-- ----------------------------
DROP TABLE IF EXISTS `tp_config_group`;
CREATE TABLE `tp_config_group` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL DEFAULT '' COMMENT '分组名',
  `sort` int(10) NOT NULL DEFAULT '0' COMMENT '排序',
  `update_time` int(10) NOT NULL DEFAULT '0' COMMENT '编辑时间',
  `create_time` int(10) NOT NULL DEFAULT '0' COMMENT '创建时间',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=14 DEFAULT CHARSET=utf8mb4 COMMENT='配置分组表';

-- ----------------------------
-- Records of tp_config_group
-- ----------------------------
BEGIN;
INSERT INTO `tp_config_group` VALUES (1, '基本配置', 0, 0, 1611819179);
INSERT INTO `tp_config_group` VALUES (2, '系统配置', 1, 0, 1611821287);
INSERT INTO `tp_config_group` VALUES (11, '小程序配置', 2, 0, 1611883235);
COMMIT;

-- ----------------------------
-- Table structure for tp_menu
-- ----------------------------
DROP TABLE IF EXISTS `tp_menu`;
CREATE TABLE `tp_menu` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `icon` varchar(255) NOT NULL DEFAULT '' COMMENT '图标',
  `name` varchar(255) NOT NULL DEFAULT '' COMMENT '菜单名',
  `url` varchar(255) NOT NULL DEFAULT '' COMMENT '跳转链接',
  `pid` int(10) NOT NULL DEFAULT '0' COMMENT '父级id',
  `sort` int(10) NOT NULL DEFAULT '0' COMMENT '排序，数值越小排序越靠前',
  `level` int(10) NOT NULL DEFAULT '1' COMMENT '1：顶部菜单，2：左侧分组菜单，3：左侧分组子菜单，4：操作菜单：如新增',
  `status` int(10) NOT NULL DEFAULT '1' COMMENT '状态；1：启用，2：禁用',
  `is_show` int(10) NOT NULL DEFAULT '1' COMMENT '1：显示，2：隐藏',
  `update_time` int(10) NOT NULL DEFAULT '0' COMMENT '修改时间',
  `create_time` int(10) NOT NULL DEFAULT '0' COMMENT '创建时间',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=52 DEFAULT CHARSET=utf8mb4 COMMENT='菜单表';

-- ----------------------------
-- Records of tp_menu
-- ----------------------------
BEGIN;
INSERT INTO `tp_menu` VALUES (1, '', '首页', '/admin/index/index', 0, 0, 1, 1, 1, 1612344138, 0);
INSERT INTO `tp_menu` VALUES (2, '', '管理', '/admin/manage/userList', 0, 1, 1, 1, 1, 1612344138, 0);
INSERT INTO `tp_menu` VALUES (3, '', '系统配置', '/admin/system/menuList', 0, 2, 1, 1, 1, 1612344138, 0);
INSERT INTO `tp_menu` VALUES (4, 'fa-indent', '首页', '/admin/index/index', 1, 1, 2, 1, 1, 1611796637, 0);
INSERT INTO `tp_menu` VALUES (5, 'fa-user-circle-o', 'DEMO', '/admin/manage/userList', 2, 1, 2, 1, 1, 1612344138, 0);
INSERT INTO `tp_menu` VALUES (6, '', '列表示例', '/admin/manage/userList', 5, 1, 3, 1, 1, 1612344121, 0);
INSERT INTO `tp_menu` VALUES (7, '', '表单示例', '/admin/manage/memberList', 5, 2, 3, 1, 1, 1612344129, 0);
INSERT INTO `tp_menu` VALUES (9, '', '轮播图列表', '/admin/manage/bannerList', 8, 3, 3, 1, 1, 1611312269, 0);
INSERT INTO `tp_menu` VALUES (10, 'fa-sliders', '配置管理', '/admin/system/configGroupList', 3, 2, 2, 1, 1, 1612344138, 0);
INSERT INTO `tp_menu` VALUES (11, 'fa-bars', '菜单管理', '/admin/system/menuList', 3, 1, 2, 1, 1, 1611795908, 0);
INSERT INTO `tp_menu` VALUES (12, '', '统计图示例', '/admin/manage/chart', 5, 3, 3, 1, 1, 1612344138, 0);
INSERT INTO `tp_menu` VALUES (13, '', '操作菜单', '/admin/system/doMenu', 11, 1, 3, 1, 2, 0, 0);
INSERT INTO `tp_menu` VALUES (31, '', '新增用户', '/admin/manage/addUser', 6, 1, 4, 1, 2, 0, 1611740596);
INSERT INTO `tp_menu` VALUES (32, '', '新增会员', '/user/manage/addMember', 7, 1, 4, 1, 2, 0, 1611740635);
INSERT INTO `tp_menu` VALUES (33, '', '配置分组', '/admin/system/configGroupList', 10, 0, 3, 1, 1, 0, 1611818162);
INSERT INTO `tp_menu` VALUES (34, '', '网站配置', '/admin/system/setConfig', 10, 0, 3, 1, 1, 0, 1611818217);
INSERT INTO `tp_menu` VALUES (35, '', '新增/编辑 分组', '/admin/system/doConfigGroup', 33, 0, 4, 1, 2, 0, 1611819599);
INSERT INTO `tp_menu` VALUES (36, '', '删除分组', '/admin/system/delConfigGroup', 33, 1, 4, 1, 2, 0, 1611819626);
INSERT INTO `tp_menu` VALUES (39, '', '编辑配置', '/admin/system/doConfig', 34, 1, 4, 1, 2, 1611881720, 1611823647);
INSERT INTO `tp_menu` VALUES (40, '', '删除配置', '/admin/system/delConfig', 34, 2, 4, 1, 2, 0, 1611823675);
INSERT INTO `tp_menu` VALUES (43, 'fa-magic', '权限管理', '/admin/system/userList', 3, 3, 2, 1, 1, 1612344138, 1611890913);
INSERT INTO `tp_menu` VALUES (44, '', '权限分组列表', '/admin/system/authGroupList', 43, 1, 3, 1, 1, 0, 1611891626);
INSERT INTO `tp_menu` VALUES (45, '', '新增/编辑 权限分组', '/admin/system/doAuthGroup', 44, 0, 4, 1, 2, 0, 1611900772);
INSERT INTO `tp_menu` VALUES (46, '', '访问授权', '/admin/system/visit', 43, 2, 3, 1, 2, 1612144032, 1611907644);
INSERT INTO `tp_menu` VALUES (47, '', '用户授权', '/admin/system/userAuth', 43, 3, 3, 1, 2, 1612144037, 1611908574);
INSERT INTO `tp_menu` VALUES (48, '', '解除授权', '/admin/system/relieveAuth', 47, 1, 4, 1, 2, 0, 1612320915);
INSERT INTO `tp_menu` VALUES (49, '', '新增授权', '/admin/system/addAuth', 47, 0, 4, 1, 2, 0, 1612321460);
INSERT INTO `tp_menu` VALUES (50, '', '删除权限分组', '/admin/system/delAuthGroup', 43, 4, 3, 1, 2, 1612339359, 1612339234);
INSERT INTO `tp_menu` VALUES (51, '', '用户信息', '/admin/system/userList', 43, 0, 3, 1, 1, 0, 1612342547);
COMMIT;

-- ----------------------------
-- Table structure for tp_user
-- ----------------------------
DROP TABLE IF EXISTS `tp_user`;
CREATE TABLE `tp_user` (
  `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  `username` varchar(255) NOT NULL DEFAULT '' COMMENT '昵称',
  `account` char(32) NOT NULL DEFAULT '' COMMENT '登录账号',
  `password` char(32) NOT NULL DEFAULT '' COMMENT '密码',
  `email` varchar(50) NOT NULL DEFAULT '' COMMENT '邮箱',
  `mobile` char(11) NOT NULL DEFAULT '' COMMENT '手机号',
  `status` int(10) NOT NULL DEFAULT '1' COMMENT '状态；1：正常；2：禁用',
  `update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '编辑时间',
  `create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `accountpassword` (`account`,`password`) USING BTREE
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COMMENT='用户表';

-- ----------------------------
-- Records of tp_user
-- ----------------------------
BEGIN;
INSERT INTO `tp_user` VALUES (1, 'admin', 'admin', 'MDAwMDAwMDAwMK6Mgq1/qIlk', '', '13121126169', 1, 1610951568, 1222907803);
INSERT INTO `tp_user` VALUES (3, 'Dave', 'Dave', 'MDAwMDAwMDAwMK6Mgq1/qIlk', '', '18573148753', 1, 1610951568, 1610951568);
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
